<?php

class Employer_UploaderController extends  Custom_Controller_Action_Default_Filemanager {
    
    public function init() {
        // Setting for multi templates
		
//    	$layoutPath = APPLICATION_PATH . '/templates/default';
//		$options = array ('layout' => 'index', 'layoutPath' => $layoutPath );
//		Zend_Layout::startMvc ( $options );
		
		$option = array('layout'=> 'index', 'layoutPath'=>PUBLIC_PATH.'/templates/employer/default');
    	Zend_Layout::startMvc($option);
		// End setting for multi templates

		$this->rootDirUpload = BASE_PATH.'/public/uploads/data';
		$this->cacherootDirUpload = BASE_PATH.'/public/uploads/cache/data';
		$this->view->assign ( 'name', 'Image Manager' );
		$this->view->assign ( 'ctrlName', $this->getRequest()->getControllerName() );
		$this->view->assign ( 'moduleName', $this->getRequest()->getModuleName() );
		$this->view->assign ( 'hastrash', '' );
		$this->view->assign ( 'tileicon', 'img/category.png' );
		$this->view->assign('title','Image Manager');
		$this->view->copyable = '';

		if ($this->getRequest ()->isXmlHttpRequest ()) {
			$this->_helper->layout->disableLayout ();
			$ajaxContext = $this->_helper->getHelper ( 'AjaxContext' );
			$ajaxContext->addActionContext ( 'view', 'html' );
			$ajaxContext->initContext ();
		}

		$ajaxContext = $this->_helper->getHelper ( 'AjaxContext' );

		$ajaxContext->addActionContext ( 'view', 'html' )
		->addActionContext ( 'form', 'html' )
		->addActionContext ( 'create', 'json' )
		->addActionContext ( 'directory', 'json' )
		->addActionContext ( 'image', 'json' )
		->addActionContext ( 'save', 'json' )
		->addActionContext ( 'delete', 'json' )
		->addActionContext ( 'copy', 'json' )
		->addActionContext ( 'move', 'json' )
		->addActionContext ( 'files', 'json' )
		->addActionContext ( 'rename', 'json' )
		->addActionContext ( 'upload', 'json' )
		->initContext ();
    }
} 
?>